-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inversion tests #639
base: master
Are you sure you want to change the base?
Inversion tests #639
Conversation
Add tests for random uints and their inverses for both v06 and v05
It looks like the tests are breaking on 32-bit platforms because you're hardcoding the number of limbs |
Ah, so that's what that was. 🤦 |
const MODULUS: [u8; 256] = hex!("5DC56576A9F077F2FD05CC35DD0B1060857CD5A44011891ED05D8C56359A9302FC9FB1D6B2FF411FAC318009C519FB7D883ACF327C2FC1181642B7A076C7DB244AB265D20605AA55EB04B5F5100B961A684033BD4E98A45DFD2AAD4B13625808FF3C947BC3712CE8D2A5688579F08B5B523B9C6EC3361535379620F49E94C85508A6E0D264A284E3F6B3C54447D5DB9A421D1FBE2A1F59FFF92D1D9F68985E51C316CA027B4E6D9AAEED0D9F41DF77CFF021BF8F7A2E55E1F2B80859C466686305671C615757BA9712513A92764F399B486723549976024BEFF7A9484C40F5E765904E3477E1B6849468D513C26997D2A9BD038511C98E48FAE3493EC6A7FE49"); | ||
|
||
#[cfg(feature = "rand_core")] | ||
mod randomized_tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seem somewhat similar to the existing proptests. Maybe it would be better to expand those to more sizes?
@dvdplm can you remove the tests that overlap with proptests, or convert them to proptests where the existing proptests are lacking? |
Right, this has been lingering, my bad. |
As a follow-up to #606, this PR extends the set of tests for modular inversion.